package ilincar.systemcore.tool;

import android.os.Environment;

import java.text.DateFormat;
import java.text.SimpleDateFormat;

/**
 * Created by ilincar on 2016/12/9.
 */

public class Utils {
    private static final String packageName = "ilincar.systemcore";
    private static final String SDCardPath = Environment.getExternalStorageDirectory().getPath();

    //异常文件的目录地址
    public static final String EXCEPTION_PATH = SDCardPath + "/android/" + packageName + "/errorlog/";

    //普通LOG信息目录地址
    public static final String LOG_PATH = SDCardPath + "/android/" + packageName + "/log/";

    //文件以 年月日小时分钟秒  命名
    public static DateFormat FILE_NAME_FORMATTER = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");

    //设置是否显示LOG信息 以Log.d 显示
    public static final boolean isDebug = false;

    //设置是否把普通LOG信息写入到文件
    public static final boolean isWriteDebug = true;

    //设置LOG信息的文件大小 默认2M
    public static final long LOG_FILE_SIZE = 2 * 1024 * 1024L;

    //设置是否在界面上显示当前的LOG信息 以toast 进行显示
    public static final boolean isShowToast = true;

    //普通LOG文件名称
    public static final String LOG_FILE_NAME = "log.txt";

}
